package test3_25.demo17;
/*
字符串右移n位,例如 “hello world” 右移两位后"ldhello wor"
要求写一个方法实现此功能,方法的格式是
 */
public class Homework14_14 {
    public static String moveToRight(String str,int position){
        String str1 = str.substring(str.length()-2,str.length());
        String str2 = str1+""+str;
        String str3 = str2.substring(0,str.length());
        return str3;
    }



    public static void main(String[] args) {
        System.out.println(Homework14_14.moveToRight("hello world", 2));
    }
}
